<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$meta_title}|Open Center管理后台</title>
    <link href="__ROOT__/Public/favicon.ico" type="image/x-icon" rel="shortcut icon">


    <!--zui-->
    <link rel="stylesheet" type="text/css" href="__ZUI__/css/zui.css" media="all">
    <link rel="stylesheet" type="text/css" href="__CSS__/admin.css" media="all">
    <link rel="stylesheet" type="text/css" href="__CSS__/ext.css" media="all">
    <!--zui end-->

    <!--
        <link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
        <link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all"-->
    <link rel="stylesheet" type="text/css" href="__CSS__/module.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
    <!--<link rel="stylesheet" type="text/css" href="__CSS__/{$Think.config.COLOR_STYLE}.css" media="all">-->
    <!--[if lt IE 9]>
    <script type="text/javascript" src="__STATIC__/jquery-1.10.2.min.js"></script>
    <![endif]--><!--[if gte IE 9]><!-->
    <script type="text/javascript" src="__PUBLIC__/js/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
    <!--<![endif]-->
    <block name="style"></block>
    <script type="text/javascript">
        var ThinkPHP = window.Think = {
            "ROOT": "__ROOT__", //当前网站地址
            "APP": "__APP__", //当前项目地址
            "PUBLIC": "__PUBLIC__", //项目公共目录地址
            "DEEP": "{:C('URL_PATHINFO_DEPR')}", //PATHINFO分割符
            "MODEL": ["{:C('URL_MODEL')}", "{:C('URL_CASE_INSENSITIVE')}", "{:C('URL_HTML_SUFFIX')}"],
            "VAR": ["{:C('VAR_MODULE')}", "{:C('VAR_CONTROLLER')}", "{:C('VAR_ACTION')}"],
            'URL_MODEL': "{:C('URL_MODEL')}"
        }
    </script>
</head>
<body>
<style>

</style>
<div class="panel-header">
    <nav class="navbar navbar-inverse admin-bar" role="navigation">
        <div class="navbar-header">
            <a href="{:U('Index/index')}" class="navbar-brand">
                <img class="logo" src="__IMG__/logo.png">
                Open Center</a>
            <!--<a class="navbar-brand" href="{:U('Index/index')}">OpenCenter 管理后台</a>-->
        </div>
        <div class="collapse navbar-collapse navbar-collapse-example">
            <ul id="nav_bar" class="nav navbar-nav">
                <volist name="__MENU__.main" id="menu">
                    <neq name="menu.hide" value="1">
                        <li data-id="{$menu.id}" class="{$menu.class|default=''}"><a href="{$menu.url|U}">
                            <neq name="menu.icon" value=""><i class="icon-{$menu.icon}"></i>&nbsp; </neq>
                            {$menu.title}</a></li>
                    </neq>

                </volist>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="javascript:0"  onclick="clear_cache()"><i class="icon-trash"></i> 清空缓存</a></li>
                <li><a target="_blank" href="{:U('Home/Index/index')}"><i class="icon-copy"></i> 打开前台</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i>
                        {:session('user_auth.username')} <b
                                class="caret"></b></a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="{:U('User/updatePassword')}">修改密码</a></li>
                        <li><a href="{:U('User/updateNickname')}">修改昵称</a></li>
                        <li class="divider"></li>
                        <li><a href="{:U('Public/logout')}">退出</a></li>
                    </ul>
                </li>
                <script>
                    function clear_cache() {
                        var msg = new $.Messager('清理缓存成功。', {placement: 'bottom'});
                        $.get('/cc.php');
                        msg.show()
                    }
                </script>
            </ul>
        </div>
    </nav>

    <div class="admin-title">

    </div>

</div>
<div class="panel-menu">
    <ul class="nav nav-primary nav-stacked">

        <volist name="__MODULE_MENU__" id="v">
            <eq name="v.is_setup" value="1">
                <li>
                    <a  href="{:U($v['admin_entry'])}" title="{$v.alias|text}" class="text-ellipsis text-center">
                        <i class="icon-{$v['icon']}"></i><br/>{$v.alias}
                    </a>
                </li>
            </eq>


        </volist>

    </ul>
    <ul class="nav nav-primary nav-stacked" style="position: absolute;bottom: 0;width: 100%">
        <li>
            <a href="{:U('module/lists')}" class="text-center">
                <i class="icon-cloud"></i><br/>更多
            </a>
        </li>
    </ul>
</div>


<div class="panel-main" style="float:left;">

    <div>


    <div class="clearfix " style="">
        <notempty name="__MENU__.child">
            <div class="sub_menu_wrapper" style="background: rgb(245, 246, 247); bottom: -10px;top: 0;position: absolute;width: 180px;overflow: auto">
                <div>
                    <nav id="sub_menu" class="menu" data-toggle="menu">
                        <ul class="nav nav-primary">
                            <block name="sidebar">
                                <!--     <notempty name="_extra_menu">
                                         {// 动态扩展菜单 //}
                                         {:extra_menu($_extra_menu,$__MENU__)}
                                     </notempty>-->
                                <volist name="__MENU__.child" id="sub_menu">
                                    <!-- 子导航 -->
                                    <notempty name="sub_menu">
                                        <li class="show">
                                            <a href="#">
                                                <notempty name="key">{$key}</notempty>
                                            </a>
                                            <ul class="nav">
                                                <volist name="sub_menu" id="menu">
                                                    <li>
                                                        <a href="{$menu.url|U}">{$menu.title}</a>
                                                    </li>
                                                </volist>
                                            </ul>
                                        </li>
                                    </notempty>
                                    <!-- /子导航 -->
                                </volist>

                            </block>

                        </ul>
                    </nav>
                </div>
            </div>
        </notempty>


        <notempty name="__MENU__.child">
            <php>$col=10;</php>
            <else/>
            <php>$col=12;</php>
        </notempty>
        <div id="main-content" class="" style="padding:10px;padding-left:0;padding-bottom:10px;left: 180px;position:absolute;right: 0;bottom: 0;top: 0;overflow: auto">
            <div id="top-alert" class="fixed alert alert-error" style="display: none;">
                <button class="close fixed" style="margin-top: 4px;">&times;</button>
                <div class="alert-content">这是内容</div>
            </div>
            <div id="main" style="overflow-y:auto;overflow-x:hidden;">
                <block name="nav">
                    <!-- nav -->
                    <notempty name="_show_nav">
                        <div class="breadcrumb">
                            <span>您的位置:</span>
                            <assign name="i" value="1"/>
                            <foreach name="_nav" item="v" key="k">
                                <if condition="$i eq count($_nav)">
                                    <span>{$v}</span>
                                    <else/>
                                    <span><a href="{$k}">{$v}</a>&gt;</span>
                                </if>
                                <assign name="i" value="$i+1"/>
                            </foreach>
                        </div>
                    </notempty>
                    <!-- nav -->
                </block>

                <block name="body"></block>
            </div>
        </div>
    </div>
    </div>
</div>

<!-- 内容区 -->

<!-- /内容区 -->
<script type="text/javascript">
    (function () {
        var ThinkPHP = window.Think = {
            "ROOT": "__ROOT__", //当前网站地址
            "APP": "__APP__", //当前项目地址
            "PUBLIC": "__PUBLIC__", //项目公共目录地址
            "DEEP": "{:C('URL_PATHINFO_DEPR')}", //PATHINFO分割符
            "MODEL": ["{:C('URL_MODEL')}", "{:C('URL_CASE_INSENSITIVE')}", "{:C('URL_HTML_SUFFIX')}"],
            "VAR": ["{:C('VAR_MODULE')}", "{:C('VAR_CONTROLLER')}", "{:C('VAR_ACTION')}"]
        }
    })();
</script>
<script type="text/javascript" src="__STATIC__/think.js"></script>

<!--zui-->
<script type="text/javascript" src="__JS__/common.js"></script>
<script type="text/javascript" src="__ZUI__/js/zui.js"></script>
<script type="text/javascript" src="__ZUI__/lib/autotrigger/autotrigger.min.js"></script>
<!--zui end-->

<script type="text/javascript">
    +function () {
        var $window = $(window), $subnav = $("#subnav"), url;
        $window.resize(function () {
            $("#main").css("min-height", $window.height() - 130);
        }).resize();


        // 导航栏超出窗口高度后的模拟滚动条
        var sHeight = $(".sidebar").height();
        var subHeight = $(".subnav").height();
        var diff = subHeight - sHeight; //250
        var sub = $(".subnav");
        if (diff > 0) {
            $(window).mousewheel(function (event, delta) {
                if (delta > 0) {
                    if (parseInt(sub.css('marginTop')) > -10) {
                        sub.css('marginTop', '0px');
                    } else {
                        sub.css('marginTop', '+=' + 10);
                    }
                } else {
                    if (parseInt(sub.css('marginTop')) < '-' + (diff - 10)) {
                        sub.css('marginTop', '-' + (diff - 10));
                    } else {
                        sub.css('marginTop', '-=' + 10);
                    }
                }
            });
        }
    }();
    highlight_subnav("{:U('Admin'.'/'.CONTROLLER_NAME.'/'.ACTION_NAME,$_GET)}")
</script>

<block name="script"></block>
<block name="modal">
</block>
</body>
</html>
